{template pifaleft}
<div class="step">
	<ul>
    	<li class="step1 stepnow"><span style=" color:#FFF">1. 基本资料</span></li>
        <li class="step2">2. 行程报价</li>
        <li class="step2">3. 具体行程</li>
        <li class="step3">4. 相关指南</li>
        <li><img src="css/user/rse.gif" width="87" height="25" /></li>
    </ul>
</div>
<script type="text/javascript">
function check_line(){
	var tform = document.modiform;
  	//标题
  	if(tform.title.value==""){
  		alert("线路名称不能为空!");
  		tform.title.focus();
		return false;
  	}
  	if (tform.title.value.length > 30){
		alert("线路名称不能超过30个字!");
		tform.title.focus();
		return false;
	}
	
	//提前天数
	if (tform.earlier_date.value == "" || tform.earlier_date.value == 0){
		alert("提前天数不能为空");
		tform.earlier_date.focus();
		return false;
	}
	if (tform.earlier_date.value != "" && tform.earlier_date.value >60){
		alert("提前天数不能大于60天");
		tform.earlier_date.focus();
		return false;
	}
	
    //检查出发地
    if(tform.city.value == ''){
        alert("请填写出发地!");
        tform.city.focus();
        return false;  	            
    }
    
    //发团日期
    if (tform.group_date.value == ''){
		//alert("请填写发团日期");
		//return false;		  	    
    }
    
    //行程天数
	if (tform.daynum.value == "" || tform.daynum.value == 0){
		alert("行程天数不能为空");
		tform.daynum.focus();
		return false;
	}
	if (tform.daynum.value != "" && tform.daynum.value >30){
		alert("行程天数不能大于30天");
		tform.daynum.focus();
		return false;
	}
	
    //检查交通
    if(tform.traffic.value == ''){
        alert("请填写交通方式!");
        tform.traffic.focus();
        return false;
    }
  	tform.submit();
}
function chg_traffic(){
	var tform = document.modiform;
		
	var arr_traffic = ['','飞机','火车','汽车','轮船','动车'];	
	var traffic1 = arr_traffic[tform.traffic_1.value];	
	var traffic2 = arr_traffic[tform.traffic_2.value];
	
	if (traffic1){
		var traffic1_ext = traffic1+'去'
	}
	
	if (traffic2){
		var traffic2_ext = traffic2+'回'
	}
	if (traffic1_ext == undefined){
		traffic1_ext = '';
	}
	if (traffic2_ext == undefined){
		traffic2_ext = '';
	}

	tform.traffic.value = traffic1_ext + traffic2_ext;
	
}
function group_date2_display(i){
	if(i==2){
  			document.getElementById('group_date2_span').innerHTML="在下一步价格类型中设置指定日期";
  	}else{
  			document.getElementById('group_date2_span').innerHTML="";
  	}
}
/*
function chg_site(){
	var siteid = get_id("siteid").options[get_id("siteid").selectedIndex].value;
	if(siteid != 0){
		var url = g_site_url + 'index.php?line/ajaxgetleibie/'+siteid+'/{$uid}/';
		send_request(url,showleibie,'/');	
	}
}
function showleibie(){
	if(http_request.responseText != ''){
		get_id("leibie").style.display = 'table';
		get_id("leibie").innerHTML = http_request.responseText;
		get_id("fenlei").style.display = 'none';
		get_id("diqu").style.display = 'none';
	}else{
		get_id("leibie").style.display = 'none';
	}
}
function chg_leibie(){
	var fid = get_id("leibieid").options[get_id("leibieid").selectedIndex].value;
	if(fid != 0){
		var url = g_site_url + 'index.php?line/ajaxgetfenlei/'+fid+'/{$uid}/';
		send_request(url,showfenlei,'/');
	}
}
function showfenlei(){
	if(http_request.responseText != ''){
		get_id("fenlei").style.display = 'table';
		get_id("diqu").style.display = 'none';
		get_id("fenlei").innerHTML = http_request.responseText;
	}else{
		get_id("fenlei").style.display = 'none';
	}
}
function chg_diqu() {
	var fdid = get_id("fenleiid").options[get_id("fenleiid").selectedIndex].value;
	if(fdid != 0){
		var url = g_site_url + 'index.php?line/ajaxgetdiqu/'+fdid+'/{$uid}/';
		send_request(url,showdiqu,'/');
	}
}
function showdiqu() {
	if(http_request.responseText != ''){
		get_id("diqu").style.display = 'table';
		get_id("diqu").innerHTML = http_request.responseText;
	}else{
		get_id("diqu").style.display = 'none';
	}
}
function checkview(obj) {
	if(obj.checked){
		var url = g_site_url + 'index.php?line/ajaxshwowviews/'+obj.value+'/{$uid}/{$lid}/';
		send_request(url,showviews,'/');	
	}else{
		get_id("view_"+obj.value).innerHTML = '';
	}
}
function showviews() {
	if(http_request.responseText != ''){
		//str = http_request.responseText.split("@");
		//get_id("view_"+str[0]).innerHTML = str[1];
	}else{
		
	}
}
*/
</script>
<div class="rightmenu"><form action="index.php?line/pifaline" method="post" name="modiform" id="modiform" enctype="multipart/form-data">
    <DL>
      <DT>产品编号：<EM>&nbsp;</EM></DT>
      <DD class="ru"><INPUT class="text text100" id=idcode maxLength=12 value="{$randString}" name=idcode onkeyup="value=value.replace(/[^\w\.\/]/ig,'')"><SPAN> 12字以内,只能填写数字与字母; 默认显示为线路ID</SPAN> </DD>
	</DL>
    <DL>
      <DT>线路名称：<EM>*</EM></DT>
<DD class="ru"><INPUT  id=no maxLength=30 name=title style="width:500px;">
      	  <div> <font style="color:#F90">城市+某景点+交通方式+时间，</font>最多30个字 例如：厦门鼓浪屿、永定土楼三日游</div> 
      </DD>
    </DL>
    
    $catestr
    $pifasite
    <DL>
      <DT>线路分类：<EM>*</EM></DT>
      <DD><SELECT name=cate_id>
      	<OPTION value="0">默认分类</OPTION>
      	{loop $catelist $value}
      	<OPTION value="{$value[cate_id]}">{$value[catename]}</OPTION>
      	{/loop}
      </SELECT> <SPAN>自定义分类，可在“线路分类管理”中进行添加、修改</SPAN> </DD>
	</DL>
 	 <DL>
      <DT>提前天数：<EM>*</EM></EM></DT>
      <DD><input style="width:40px;"  class="ru" id="earlier_date" name="earlier_date" type="text" maxlength="2" value="" onkeyup="this.value=this.value.replace(/\D/g,'')" onKeypress="if (event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;" /><SPAN> 游客须提前报名的天数</SPAN> </DD>
	</DL>
	<DL>
      <DT>行程开始地点：<EM>&nbsp;</EM></DT>
      <DD class="ru"><INPUT class="text text100" id=city maxLength=12 name=city><SPAN>请正确填写行程开始地点</SPAN> </DD>
	</DL>
	<DL>
      <DT>行程天数：<EM>*</EM></EM></DT>
      <DD><input style="width:40px;"  class="ru" id="daynum" name="daynum" type="text" value="" onkeyup="this.value=this.value.replace(/\D/g,'')" onKeypress="if (event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;" /><SPAN> 游客须提前报名的天数</SPAN> </DD>
	</DL>
    <DL>
      <DT>交通方试</DT>
      <DD class="ru"><select name="traffic_1" onchange="chg_traffic()">
      <option value="0">请选择</option>
      <option value="1">飞机</option>
      <option value="2">火车</option>
      <option value="3">汽车</option>
      <option value="4">轮船</option>
      <option value="5">动车</option>      
      </select>去
        <select name="traffic_2" onchange="chg_traffic()">
          <option value="0">请选择</option>
          <option value="1">飞机</option><option value="2">火车</option><option value="3">汽车</option><option value="4">轮船</option><option value="5">动车</option>        </select>回&nbsp;  
       <input name="traffic" type="text" value=""/><span class="c_808080"> 往返交通或行程包含的交通方式</span></DD>
       
    
	</DL>
     <!-- <DL>
      <DT>发团日期：<EM>*</EM></DT>
      <DD class="inputclearboth"><input type="radio" class="radio" name="group_date" value="1" onclick="group_date2_display(1);"/>天天发团</label> <label><input type="radio" class="radio" name="group_date" value="2"  checked onclick="group_date2_display(2);" />指定日期</label>&nbsp;&nbsp;<span id="group_date2_span" class="c_808080"></span>
      </DD>
  </DL> -->
     <DL >
      <DT>线路描述图：</DT>
      <DD>
        <input id="idFile" type="file" name="imgurl"/>
       <span style="color:#F90">点击上传JPG或GIF格式的图片，尺寸270*170、最大支持2M</SPAN> </DD>
    </DL>
    <DL>
      <DT>排序：</EM></DT>
      <DD><input name="orderid"  class="text" type="text" value="999" maxlength="5"/> <span class="c_808080">数字越小排越前，仅对网店有效</span> </DD>
	</DL>
     <DL>
      <DT>是否显示：<EM>*</EM></DT>
       <DD class="inputclearboth"> <input name="isrec" type="radio" value="1"  checked/> 显示  <input name="isrec" type="radio" class="radio" value="0" /> 隐藏 </DD>  
  </DL>
    <DL>
      <DT>是否跳转：<EM>*</EM></DT>
      <DD class="inputclearboth"> <input name="tz" type="radio" value="1" /> 继续编辑  <input name="tz" type="radio" value="2" /> 跳转列表 
      <input name="tz" type="radio" value="3" checked/> 编辑价格 <input type="hidden" value="{$uid}" name="uid" /></DD>
	</DL>
  <div class="adsubdiv"><input type="hidden" value="{$uid}" name="uid" />
    <input type="image" src="{SITE_URL}css/user/adminsub.gif" width="109" height="32"  onclick="check_line();"/></div>	</form>
</div>

<!-- bottom-->
{template footer}